<?php

namespace app\modules\admin\models;

use Yii;

/**
 * This is the model class for table "advertisement_position".
 *
 * @property int $id
 * @property string $position_name 广告位名称
 * @property string $position_key 广告位标识
 * @property int $ad_width 广告宽度
 * @property int $ad_height 广告高度
 * @property string $position_description 广告描述
 * @property int $deleted 是否删除
 * @property string $created 创建时间
 * @property string $modified 修改时间
 */
class AdvertisementPosition extends BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'advertisement_position';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['position_name', 'position_key', 'ad_width', 'ad_height'], 'required'],
            [['ad_width', 'ad_height', 'deleted'], 'integer'],
            [['created', 'modified'], 'safe'],
            [['position_name'], 'string', 'max' => 50],
            [['position_key'], 'string', 'max' => 30],
            [['position_description'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'position_name' => Yii::t('app', '广告位名称'),
            'position_key' => Yii::t('app', '广告位标识'),
            'ad_width' => Yii::t('app', '广告宽度'),
            'ad_height' => Yii::t('app', '广告高度'),
            'position_description' => Yii::t('app', '广告描述'),
            'deleted' => Yii::t('app', '是否删除'),
            'created' => Yii::t('app', '创建时间'),
            'modified' => Yii::t('app', '修改时间'),
        ];
    }
}
